package cn.liccshop.core.proscenium.shopUser.service;

import cn.liccshop.core.entity.ShopUser;
import cn.liccshop.sys.exception.MySystemException;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * <p>
 * 消费者用户表 服务类
 * </p>
 *
 * @author LiCC
 * @since 2019-04-28
 */
public interface IShopUserService extends IService<ShopUser> {

    /**
     * 用户登录返回token
     * @param shopUser
     * @return
     */
    ShopUser login(ShopUser shopUser) throws MySystemException;
    /**
     * 通过userId获取用户信息
     * @param userId
     * @return
     */
    ShopUser getUserInfo(String userId) throws MySystemException;

    /**
     * 用户注册
     * @param user
     * @return
     */
    boolean registerInfo(ShopUser user) throws MySystemException;

    /**
     * 用户重置密码
     * @param user
     * @return
     */
    boolean restPassword(ShopUser user) throws MySystemException;

    /**
     *用户请求短信
     * @param mobile
     * @param ip
     */
    void sendVercode(String mobile, String ip) throws MySystemException;

    /**
     * 获取不同性别的用户数据
     * @return
     */
    Map<String, Object> getCountGroupBySex();
}
